package com.tvein.sanguo.prompt.controller
{
	//flash
	//pureMVC
	import org.puremvc.as3.multicore.interfaces.INotification;
	import org.puremvc.as3.multicore.utilities.fabrication.patterns.command.SimpleFabricationCommand;	
	//custom
	import com.tvein.sanguo.Prompt;
	import com.tvein.sanguo.prompt.model.SystemProxy;
	import com.tvein.sanguo.prompt.model.MessageProxy;
	import com.tvein.sanguo.prompt.view.PromptMediator;
	import com.tvein.sanguo.prompt.view.SystemMediator;
//
	public class PromptStartupCommand extends SimpleFabricationCommand
	{
		override public function execute(note:INotification):void
		{
			var prompt:Prompt = note.getBody() as Prompt;
			
			facade.registerProxy(new SystemProxy());
			facade.registerProxy(new MessageProxy());
			
			registerMediator(new SystemMediator(prompt));
			registerMediator(new PromptMediator(prompt));
		}
	}
}